export const componentConfigs = {
  navbar: {
    label: '导航栏',
    icon: 'Menu',
    defaultConfig: {
      title: '页面标题',
      showBack: true,
      rightButtons: []
    }
  },
  banner: {
    label: '轮播图',
    icon: 'Picture',
    defaultConfig: {
      height: 180,
      autoplay: true,
      interval: 3000,
      items: []
    }
  },
  grid: {
    label: '宫格导航',
    icon: 'Grid',
    defaultConfig: {
      columns: 4,
      items: []
    }
  },
  goods: {
    label: '商品列表',
    icon: 'Goods',
    defaultConfig: {
      showType: 'list',
      items: []
    }
  },
  tabBar: {
    label: '标签栏',
    icon: 'Menu',
    defaultConfig: {
      items: [
        { text: '首页', icon: 'House', link: '/pages/home/index' },
        { text: '分类', icon: 'Menu', link: '/pages/category/index' },
        { text: '购物车', icon: 'ShoppingCart', link: '/pages/cart/index' },
        { text: '我的', icon: 'User', link: '/pages/user/index' }
      ],
      activeColor: '#409EFF'
    }
  },
  notice: {
    label: '公告栏',
    icon: 'Bell',
    defaultConfig: {
      content: '请输入公告内容',
      scrollable: true,
      speed: 50,
      link: ''
    }
  },
  search: {
    label: '搜索框',
    icon: 'Search',
    defaultConfig: {
      placeholder: '请输入搜索关键词',
      style: 'default',
      link: '/pages/search/index'
    }
  },
  imageAd: {
    label: '图片广告',
    icon: 'PictureFilled',
    defaultConfig: {
      image: '',
      link: ''
    }
  },
  category: {
    label: '分类导航',
    icon: 'Menu',
    defaultConfig: {
      items: [],
      style: 'card'
    }
  },
  coupon: {
    label: '优惠券',
    icon: 'Ticket',
    defaultConfig: {
      items: [],
      style: 'card'
    }
  },
  form: {
    label: '表单',
    icon: 'Tickets',
    defaultConfig: {
      items: [
        { type: 'input', label: '姓名', required: true },
        { type: 'phone', label: '手机号', required: true },
        { type: 'textarea', label: '备注' }
      ],
      submitText: '提交'
    }
  },
  blank: {
    label: '辅助空白',
    icon: 'Operation',
    defaultConfig: {
      height: 20
    }
  },
  divider: {
    label: '分割线',
    icon: 'Remove',
    defaultConfig: {
      text: '',
      dashed: false
    }
  },
  richText: {
    label: '富文本',
    icon: 'Document',
    defaultConfig: {
      content: ''
    }
  },
  video: {
    label: '视频',
    icon: 'VideoPlay',
    defaultConfig: {
      url: '',
      cover: '',
      autoplay: false
    }
  },
  imageGroup: {
    label: '图片组',
    icon: 'PictureRounded',
    defaultConfig: {
      items: [],
      cols: 3,
      gap: 8
    }
  },
  floatButton: {
    label: '悬浮按钮',
    icon: 'Plus',
    defaultConfig: {
      text: '按钮',
      icon: 'Plus',
      position: 'bottom-right',
      link: ''
    }
  },
  skeleton: {
    label: '骨架屏',
    icon: 'Loading',
    defaultConfig: {
      loading: true,
      rows: 3,
      avatar: true,
      title: true
    }
  },
  steps: {
    label: '步骤条',
    icon: 'Sort',
    defaultConfig: {
      active: 0,
      items: [
        { title: '步骤1', description: '这是第一步' },
        { title: '步骤2', description: '这是第二步' },
        { title: '步骤3', description: '这是第三步' }
      ]
    }
  },
  progress: {
    label: '进度条',
    icon: 'TrendCharts',
    defaultConfig: {
      percentage: 50,
      showText: true,
      type: 'line'
    }
  },
  qrcode: {
    label: '二维码',
    icon: 'Crop',
    defaultConfig: {
      value: 'https://example.com',
      size: 200,
      color: '#000000'
    }
  },
  countdown: {
    label: '倒计时',
    icon: 'Timer',
    defaultConfig: {
      endTime: '',
      format: 'DD天HH时mm分ss秒'
    }
  },
  swipeCell: {
    label: '滑动单元格',
    icon: 'DCaret',
    defaultConfig: {
      title: '左滑查看更多操作',
      rightButtons: [
        { text: '收藏', type: 'primary', link: '' },
        { text: '删除', type: 'danger', link: '' }
      ]
    }
  }
}